<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        .menu{
            position: relative;
            left: 100px;
            top: 100px;
            display: flex;
            /* transform-style: preserve-3d;
            transition: all 1s; */
        }
        .menu>li{
            /* 包含两个div就要配置3d环境 */
            perspective: 10000px;
            transform-style: preserve-3d;
            /* 过渡 300毫秒旋转 */
            transition: all 300ms;
        }
        .menu>li,.menu>li>div{
            height: 30px;
            line-height: 30px;
            width: 100px;
            text-align: center;
        }
        .menu>li>div{
            position: absolute;
        }
        .menu>li>div:nth-child(1){
            background-color: yellow;
            transform: translateZ(15px);
        }
        .menu>li>div:nth-child(2){
            background-color: yellowgreen;
            transform: rotateX(90deg) translateZ(15px);
        }
        .menu>li:hover{
            transform: rotateX(-90deg);
        }
    </style>
</head>
<body>
    <div class="menu">
        <li>
            <div class="a">我的</div>
            <div class="b">hmapp.net</div>
        </li>
        <li>
            <div class="a">商品</div>
            <div class="b">hmapp.net</div>
        </li>
        <li>
            <div class="a">购物车</div>
            <div class="b">hmapp.net</div>
        </li>
        <li>
            <div class="a">关于</div>
            <div class="b">hmapp.net</div>
        </li>
        <li>
            <div class="a">钱包</div>
            <div class="b">hmapp.net</div>
        </li>
    </div>
</body>
</html>